/* 
 * File:   PostingFileDB.h
 * Author: eduardo
 *
 * Created on 20 de noviembre de 2012, 12:17
 */

#ifndef POSTINGFILEDB_H
#define	POSTINGFILEDB_H

#include <vector>
using namespace std;

// db
#include <odb/core.hxx>

#include "DocOccurrence.h"

#pragma db object
class PostingFileDB {
public:
    PostingFileDB(int idpf, const vector<DocOccurrence>& vec);

    void pushBack(const DocOccurrence& doc);

    int getIDPF();
    const vector<DocOccurrence>& getOccurrences();

private:

    PostingFileDB() {
    }
    friend class odb::access;

#pragma db id
    int _idpf;
    vector<DocOccurrence> _occurrences;
};

#endif	/* POSTINGFILEDB_H */

